package com.basic

/**
 * @description:
 * @author: marshal
 * @date: 2021-08-09 5:07 PM
 */
object ForTtest extends App {
  // Iteration through collections
  for (i <- 1 to 5) println(i)

  // Filtering
  for (i <- 1 to 5 if i > 3) println(i)

  // producing a new collection
 val nums = for (i <- 1 to 10 if i % 2 == 0) yield i
 nums foreach println

 //
}
